<%@ page import="com.apexedu.identity.entity.TSysUser" %>
<%@ page import="com.apexedu.identity.IdConstants" %>
<%@ page contentType="text/html; charset=utf-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<%
    request.setAttribute("basePath", request.getContextPath());
    TSysUser user = (TSysUser) request.getSession().getAttribute(IdConstants.SESSION_USER);
    boolean succ = user == null;
%>
<head>
    <title>密码修改</title>
    <script type="text/javascript" src="${basePath}/clientui/js/jquery-1.4.js"></script>
    <style type="text/css">
        .main {
            border-radius: 5px;
            margin: 0px auto;
            width: 1000px;
            height: 100%;
            margin-top: 50px;
        }

        .tableStyle {
            margin: 0px auto;
        }
    </style>


    <script language="JavaScript" type="text/JavaScript">
        function dataCheck() {
            var userPwdOld = $("#userPwdOld").val();
            var userPwdNew = $("#userPwdNew").val();
            var dlmmnew = $("#dlmmnew").val();
            var url = "${basePath}/s/uc/pwd/u/" + userPwdOld + "/" + userPwdNew + "/" + dlmmnew;
            $.get(url, function (data) {

                $("#msg").html(data);
            });
        }
        $(function () {
            var succ = '<%=succ%>';
            if (succ == 'true') {
                window.location.href = '${basePath}/';
            }
        });
        function doreset() {
            $("div table input").each(
                    function(i) {
                        if ($(this).attr("type") == 'text'
                                || $(this).attr("type") == 'password') {
                            $(this).val('');
                        }
                    })
            $("div table select").val('');
        }
    </script>
</head>
<body>

<div class="box1" panelWidth="99%">

    <fieldset class="main">
        　
        <legend>密码修改</legend>
        <table class="tableStyle" transMode="true" footer="normal">
            <tr>
                <td height="35" align="right" width="30%">&nbsp;原密码：<strong>&nbsp;
                </strong></td>
                <td align="left" width="70%">
                    <input type="password" id="userPwdOld" name="userPwdOld" tabindex="2"
                           maxlength="50" theme="simple" size="15"/>
                    <font color="#FF0000">*</font> <font color="#666666">输入您正在使用的密码，用于确认您的身份！</font>
                </td>
            </tr>
            <tr>
                <td height="35" align="right" width="30%">&nbsp;新密码：<strong>&nbsp;
                </strong></td>
                <td align="left" width="70%">
                    <input type="password" id="userPwdNew" name="userPwdNew" tabindex="2" maxlength="50"
                           theme="simple"
                           size="15"/>
                    <font color="#FF0000">*</font> <font color="#666666">输入新密码！</font>
                </td>
            </tr>
            <tr>
                <td height="35" align="right" width="30%">&nbsp;确认新密码：<strong>&nbsp;
                </strong></td>
                <td align="left" width="70%"><input name="dlmmnew" type="password" id="dlmmnew" size="15"
                                                    maxlength="50">
                    <font color="#FF0000">*</font> <font color="#666666">请再输入一次上面写的新密码！</font>
                </td>
            </tr>
        </table>
    </fieldset>
    <div class="padding_top10">
        <table class="tableStyle" transMode="true">
            <tr>
                <td height="50" colspan="4" align="left" width="80%">
                    <input type="button" id="datecheckButton" value=" 提交 " onclick="dataCheck()"/>
                    <input type="button" id="doresetButton" value=" 清除 " onclick="doreset()"/>
                    <span id="msg" style="color: red"></span>
                </td>
                <td width="20%">&nbsp;</td>
            </tr>
        </table>
    </div>
</div>

</body>

</html>
